import Vue from "vue"
import Vuex from "vuex"
import Account from "./Account"
import ShopSettleIn from "./ShopSettleIn"

Vue.use(Vuex)
const handleStore = store => {
  if (localStorage.state) store.replaceState(JSON.parse(localStorage.state))

  store.subscribe((mutation, state) => {
    localStorage.setItem("state", JSON.stringify(state))
  })
}
export default new Vuex.Store({
  modules: {
    Account,
    ShopSettleIn
  },
  // plugins: [handleStore]
})
